﻿using System;
using System.Web;
using System.Web.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Portal.Presentation.Providers;
using Portal.Presentation.Services;
using Portal.Presentation.Tests.Units;
using Rhino.Mocks;

namespace Portal.Presentation.Controllers.Tests.Units
{
	[TestClass]
	public abstract class BaseControllerTests<C> : BaseTests where C : Controller
	{
		protected HttpSessionStateBase Session { get; private set; }
		protected ISessionService SessionService { get; private set; }
		protected ISecurityProvider SecurityProvider { get; private set; }


		protected override void InitializeTest()
		{
			Session = Mocks.Stub<HttpSessionStateBase>();
			SessionService = Mocks.DynamicMock<ISessionService>();
			SecurityProvider = Mocks.DynamicMock<ISecurityProvider>();

		}

		protected abstract C GetController();
	}
}
